import Gobj from "./Gobj";
import GameWx from "../GameWx";

export default class Vobj extends Laya.Sprite{
    constructor(){
        super();
    }

    id = 0;
    sx = 0;
    sy = 0;
    init(o: Gobj) {        
        if (this.isUP(o)) { 
            this.x = this.sx = 665;
            this.y = this.sy = 80;
        } else {
            this.x = this.sx = 85;
            this.y = this.sy = 1260;            
        }
    }

    /**上方显示 */
    isUP(o: Gobj){
        //1 == 房主 == playerid == pid == role
        return o.pid != (GameWx.I.my.role==1?1:2);
    }

    efe(o:Gobj,lf:number,fms:number){}

    destory(){
        this.removeSelf();
    }
}